package com.ruoyi.member.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.member.mapper.FamilyImageMapper;
import com.ruoyi.member.domain.FamilyImage;
import com.ruoyi.member.service.IFamilyImageService;

/**
 * 家庭图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
@Service
public class FamilyImageServiceImpl implements IFamilyImageService 
{
    @Autowired
    private FamilyImageMapper familyImageMapper;

    /**
     * 查询家庭图片
     * 
     * @param id 家庭图片主键
     * @return 家庭图片
     */
    @Override
    public FamilyImage selectFamilyImageById(Long id)
    {
        return familyImageMapper.selectFamilyImageById(id);
    }

    /**
     * 查询家庭图片列表
     * 
     * @param familyImage 家庭图片
     * @return 家庭图片
     */
    @Override
    public List<FamilyImage> selectFamilyImageList(FamilyImage familyImage)
    {
        return familyImageMapper.selectFamilyImageList(familyImage);
    }

    /**
     * 新增家庭图片
     * 
     * @param familyImage 家庭图片
     * @return 结果
     */
    @Override
    public int insertFamilyImage(FamilyImage familyImage)
    {
        familyImage.setCreateTime(DateUtils.getNowDate());
        return familyImageMapper.insertFamilyImage(familyImage);
    }

    /**
     * 修改家庭图片
     * 
     * @param familyImage 家庭图片
     * @return 结果
     */
    @Override
    public int updateFamilyImage(FamilyImage familyImage)
    {
        familyImage.setUpdateTime(DateUtils.getNowDate());
        return familyImageMapper.updateFamilyImage(familyImage);
    }

    /**
     * 批量删除家庭图片
     * 
     * @param ids 需要删除的家庭图片主键
     * @return 结果
     */
    @Override
    public int deleteFamilyImageByIds(Long[] ids)
    {
        return familyImageMapper.deleteFamilyImageByIds(ids);
    }

    /**
     * 删除家庭图片信息
     * 
     * @param id 家庭图片主键
     * @return 结果
     */
    @Override
    public int deleteFamilyImageById(Long id)
    {
        return familyImageMapper.deleteFamilyImageById(id);
    }
}
